package com.zf.flutter_app;

import android.util.Log;

import com.baidu.mapapi.map.MapView;

import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugin.common.StandardMessageCodec;

public class MapViewRegistrant {

    private static final String TAG = MapViewRegistrant.class.getName();

    public static void registerWith(PluginRegistry registry) {
        final String key = MapViewRegistrant.class.getCanonicalName();
        Log.i(TAG,"registerKey="+key);
        if (registry.hasPlugin(key)) {
            return;
        }
        MainActivity activity = (MainActivity) registry;
        PluginRegistry.Registrar registrar = registry.registrarFor(key);
        registrar.platformViewRegistry().registerViewFactory("mapview", new MapViewFactory(new StandardMessageCodec(),activity));
    }

}
